﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Text;
using System.Drawing;
using SlimDX;
using SlimDX.Direct3D9;

using System.Windows.Forms;
using System.Runtime.Serialization;
using System.Security.Permissions;
using System.IO;
using System.Xml;
using System.Xml.Serialization;
namespace Splino.D3D
{
    /// <summary>
    /// A 3D point object with an additional Weight property for use as a control point
    /// in weight splines
    /// </summary>
    [Serializable()]
    public class WeightedPointObject : PointObject
    {
        /// <summary>
        /// The point's weight on the parent spline
        /// </summary>
        protected float _weight = 1;
        /// <summary>
        /// Gets or sets the point's weight on its parent spline
        /// </summary>
        public float Weight
        {
            get { return _weight; }
            set
            {
                _weight = value;

                DeviceManager.Instance.RequestRender();
            }
        }

        /// <summary>
        /// Constructor
        /// </summary>
        public WeightedPointObject() : base()  { }
        /// <summary>
        /// Protected constructor used for creating Point Objects from
        /// clipboard data objects
        /// </summary>
        /// <param name="info">Clipboard Serialization Info</param>
        /// <param name="context">Clipboard Streaming Context</param>
        protected WeightedPointObject(SerializationInfo info, StreamingContext context)
            : base(info, context) { }
    }
}
